home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Info-Mac 4
/
Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso
/
Applications
/
CC Converter 1.1.1
/
Scripts
/
MicroPhone™
/
CAUL download search
next >
Wrap
Text File
|
1994-03-21
|
2KB
|
54 lines
Settings File = script test
Script Name = CAUL download search
Command Key =
F-Key =
Menu = YES
Button = NO
Version = 5001
System = Macintosh
Remark "Script that automates downloading searches from the CAUL Current Contents"
Remark "database. It should only be run from the Browse List menu."
Remark "The user is prompted for the name of the new file and for"
Remark "the number of items."
Remark "© Kevin Sanderson 1994"
Remark "### Get the name/location of a file to save to"
Set Variable * captureFile from New File Dialog "'Save Search As: ' , 'CC search'"
If Expression "Length( captureFile ) <= 0"
Remark "### User selected cancel so abort quietly"
Delete Variable captureFile
Abort Script
End If
Remark "### Get the number of items to capture"
Set Variable * nosItems from Dialog Box "'Enter number or range of items to display, eg 23 or 1-5 or all' , 'all'"
If Expression "Length( nosItems ) <= 0"
Remark "### User did not enter a value"
Alert * OK "'Script aborted as no selection was made.'"
Delete Variable nosItems
Delete Variable captureFile
Abort Script
End If
Set Variable * moreItems from Expression "TRUE"
Remark "### Capture the info as it appears on the screen"
Open Capt. File * from Screen "captureFile"
Send Text String "nosItems&'^M'"
Remark "### Continue sending a return (to display the next page) until"
Remark "### all the info has been displayed"
Repeat
When Text in Stream is "'END OF D'"
Remark "### End of display"
Set Variable * moreItems from Expression "FALSE"
Or When Text in Stream is "'ENTER'"
Remark "### more items to display so send a return"
Send Text String "'^M'"
Or When Seconds Have Passed "15"
Remark "### timeout or some other error"
Alert * OK "'Aborting script. The response timed out or there was some other error.'"
Set Variable * moreItems from Expression "FALSE"
End When
Until Expression "moreItems = FALSE"
Capture * Off
Delete Variable nosItems
Delete Variable moreItems
Delete Variable captureFile